from tests import BlogLoginTest
from tests import BlogListTest
from tests import BlogDetailTest
from tests import BlogEditTest
from common.Util import BlogDriver

if __name__ == "__main__":
    # 成功登录测试
    # BlogLoginTest.BlogLogin().LoginSucTest()
    # 失败登录测试
    # BlogLoginTest.BlogLogin().LoginFailTest("xdt","123456","用户不存在")
    # BlogLoginTest.BlogLogin().LoginFailTest("zhangsan","111111","密码错误")
    # BlogLoginTest.BlogLogin().LoginFailTest("zhangsan","","账号或密码不能为空")
    # BlogLoginTest.BlogLogin().LoginFailTest("","123456","账号或密码不能为空")


    # 列表页测试
    # 登录
    # BlogLoginTest.BlogLogin().LoginSucTest()
    # # 测试登录状态下的列表页
    # BlogListTest.BlogList().BlogLoginListTest()
    # # 注销
    # BlogListTest.BlogList().QuitBlogLoginListText()
    # # 测试未登录状态下的列表页
    # BlogListTest.BlogList().NotBlogLoginListTest()

    # # 详情页面测试
    # BlogLoginTest.BlogLogin().LoginSucTest()
    # # 测试登录状态下的详情页
    # BlogDetailTest.BlogDetail().BlogLoginDetailTest()
    # # 注销
    # BlogDetailTest.BlogDetail().QuitBlogLoginListText()
    # # 测试未登录状态下的详情页
    # BlogDetailTest.BlogDetail().NotBlogLoginDetailTest()

    # 删除博客测试
    # 登录
    BlogLoginTest.BlogLogin().LoginSucTest()
    # 进入博客详情页
    BlogDetailTest.BlogDetail().BlogLoginDetailTest()
    # 删除博客
    BlogDetailTest.BlogDetail().DeleteBlogLoginDetailTest()

    # 编辑页面测试
    # 登录
    BlogLoginTest.BlogLogin().LoginSucTest()
    # 进入博客编辑页
    BlogEditTest.BlogEdit().BlogLoginEditTest()